package com.smommo.myapp;

import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.core.env.ConfigurableEnvironment;

@SpringBootApplication
public class MyAppApplication {

    public static void main(String[] args) {
        ConfigurableApplicationContext context = SpringApplication.run(MyAppApplication.class, args);
//        ConfigurableEnvironment environment = context.getEnvironment();
//        String myApp = environment.getProperty("applicationName");
//        System.out.println(myApp);
//        ConfigurableListableBeanFactory factory = context.getBeanFactory();
//        System.out.println(factory.getClass());
//        MyAppApplication bean = context.getBean(MyAppApplication.class);
//        System.out.println(bean);
//        ConfigurableListableBeanFactory beanFactory = context.getBeanFactory();
//        BeanDefinition userBF = beanFactory.getBeanDefinition("user");
//        BeanDefinition aaBF = beanFactory.getBeanDefinition("aa");
//        BeanDefinition teacher = beanFactory.getBeanDefinition("teacher");
//        System.out.println(userBF.getClass());
//        System.out.println(aaBF.getClass());
//        System.out.println(teacher.getClass());

    }

}
